package com.xkh.common.model.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@NoArgsConstructor
public class PositionDTO implements Serializable {
    @ApiModelProperty("用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;
    @ApiModelProperty("经度")
    @NotNull(message = "经度不能为空")
    private Double longitude;
    @ApiModelProperty("纬度")
    @NotNull(message = "纬度不能为空")
    private Double latitude;
    @ApiModelProperty("性别 1男 2女")
    @NotNull(message = "性别不能为空")
    private Integer sex;

    public PositionDTO(Long userId, Double longitude, Double latitude, Integer sex) {
        this.userId = userId;
        this.longitude = longitude;
        this.latitude = latitude;
        this.sex = sex;
    }
}
